package a.f.h.c;

import a.c.m;
import a.c.v;
import a.c.z;
import a.f.h.b.f;
import a.f.h.b.k;
import a.f.j.o;

public class h
  implements c
{
  private f a;
  private l b;
  private l c;
  public static int d;
  
  public void a(f paramf, l paraml1, l paraml2)
  {
    this.a = paramf;
    this.b = paraml1;
    this.c = paraml2;
    a();
  }
  
  public void a()
  {
    boolean bool = d.o;
    int i = d.n;
    do
    {
      o localo = this.a.c();
      while (i == 0)
      {
        if (!localo.e()) {
          break;
        }
        a(a(localo.a()));
        localo.f();
      }
    } while (bool);
  }
  
  private void a(z paramz)
  {
    boolean bool = d.o;
    int k = d.n;
    int i = paramz.size();
    label66:
    label69:
    do
    {
      int j = 0;
      while (k == 0)
      {
        do
        {
          if (j >= i) {
            break label69;
          }
          if (bool) {
            break label66;
          }
          if (!b(paramz)) {
            break;
          }
          j = 0;
          i = paramz.size();
          if (bool) {
            break label66;
          }
        } while (k == 0);
        paramz.add(paramz.b());
        j++;
      }
    } while (bool);
  }
  
  private z a(a.f.j.n paramn)
  {
    boolean bool = d.o;
    int i = d.n;
    z localz = new z();
    m localm = paramn.a();
    label123:
    label124:
    do
    {
      if (!localm.e()) {
        break;
      }
      a.c.d locald = localm.a();
      if (!bool)
      {
        if (this.a.e(locald) == 2) {
          break label389;
        }
        if (bool) {}
      }
      else if (this.a.i(locald) != k.a)
      {
        if (bool) {
          break label124;
        }
        if (this.a.i(locald) != k.c) {
          break label123;
        }
      }
      l locall1 = this.c;
      l locall2 = this.b;
      if (!bool)
      {
        if (i != 0) {
          locall1 = this.b;
        }
      }
      else {
        locall2 = this.c;
      }
      d locald1 = locall2.a(locald);
      a.c.e locale = locald.e();
      a.f.h.d.l locall3 = new a.f.h.d.l(locald1);
      d locald2 = locall1.a(locale);
      a.f.h.d.l locall4 = new a.f.h.d.l(locald2);
      a.f.h.d.e locale1;
      switch (this.a.e(locald))
      {
      case 1: 
        locale1 = new a.f.h.d.e(locall4, locall3, 0, this.a.i(locald), 2);
        localz.add(locale1);
        if (bool) {
          continue;
        }
        if (i == 0) {
          break;
        }
      case 3: 
        locale1 = new a.f.h.d.e(locall4, locall3, 1, this.a.i(locald), 2);
        localz.add(locale1);
        if (bool) {
          continue;
        }
        if (i == 0) {
          break;
        }
      case 4: 
        k localk = this.a.i(locald).b();
        locale1 = new a.f.h.d.e(locall3, locall4, 1, localk, 2);
        localz.add(locale1);
        locale1 = new a.f.h.d.e(locall4, locall3, 1, this.a.i(locald), 2);
        localz.add(locale1);
        if (bool) {
          continue;
        }
        if (i == 0) {
          break;
        }
      case 2: 
      default: 
        System.err.println("Impossible Angle !");
      }
      localm.f();
    } while (i == 0);
    label389:
    return localz;
  }
  
  public boolean b(z paramz)
  {
    boolean bool = d.o;
    int i = d.n;
    if (!bool) {
      if (paramz.size() < 4) {
        return false;
      }
    }
    v localv = paramz.g();
    a.f.h.d.e locale1 = (a.f.h.d.e)localv.c();
    localv = localv.b();
    a.f.h.d.e locale2 = (a.f.h.d.e)localv.c();
    localv = localv.b();
    a.f.h.d.e locale3 = (a.f.h.d.e)localv.c();
    localv = localv.b();
    a.f.h.d.e locale4 = (a.f.h.d.e)localv.c();
    if (!bool) {
      if (locale4.b() == 1)
      {
        if (bool) {
          break label364;
        }
        if (locale3.b() == 0)
        {
          if (bool) {
            break label364;
          }
          if (locale2.b() == 0)
          {
            paramz.e();
            paramz.e();
            paramz.e();
            paramz.e();
            a.f.h.d.e locale5 = new a.f.h.d.e(locale4.d(), locale2.e(), 0, locale2.c(), 2);
            paramz.add(locale5);
            paramz.add(locale1);
            a.f.h.d.l locall1 = locale4.d();
            a.f.h.d.l locall2 = locale1.e();
            if (!bool) {
              if (locale4.c().c(k.d))
              {
                a.f.h.d.l.a(this.b, locall1, locall2, 1);
                if (bool) {
                  break label362;
                }
                if (i == 0) {
                  break label361;
                }
              }
            }
            if (!bool) {
              if (locale4.c().c(k.b))
              {
                a.f.h.d.l.a(this.b, locall2, locall1, 1);
                if (bool) {
                  break label362;
                }
                if (i == 0) {
                  break label361;
                }
              }
            }
            if (!bool) {
              if (locale4.c().c(k.c))
              {
                a.f.h.d.l.a(this.c, locall2, locall1, 1);
                if (bool) {
                  break label362;
                }
                if (i == 0) {
                  break label361;
                }
              }
            }
            if (!bool)
            {
              if (locale4.c().c(k.a)) {
                a.f.h.d.l.a(this.c, locall1, locall2, 1);
              }
            }
            else
            {
              if (bool) {
                break label362;
              }
              if (i == 0) {
                break label361;
              }
            }
            a.i.n.a("Consistency Error in rect decomp.");
            label361:
            label362:
            return true;
          }
        }
      }
    }
    label364:
    return false;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.h.c.h

 * JD-Core Version:    0.7.0.1

 */